home *** CD-ROM | disk | FTP | other *** search
- File Name:
-
- crystal.doc
-
- Title:
-
- crystal -- Copyright (c)1985 Scott D. Thomas, Palo Alto, CA, 85-11-03
- For public distribution in its original form.
-
- Purpose:
-
- Project a three dimensional wire frame object to the IBM PC's graphics
- screen by using a rotation and projection to two dimensions. User may
- rotate the object about each coordinate axis and change the perspective.
- A movie that consists of up to 500 three dimensional objects may also be
- displayed in sequence together with the rotation mentioned above.
-
- Performance:
-
- An object consisting of 80 line segments can be rendered at least five
- times per second, provided an 8087 or 80287 math chip is installed.
- Crystal will still work without the math chip, but at a much reduced rate.
-
- Discussion:
-
- This program requires an IBM PC, DOS 2.0+, a Color Graphics Adapter
- and 256 K. Optional math chip will be used unless NO87 is defined.
-
- Use the cursor keys, Ins-Del, or j-u, k-i, l-o, ;-p to rotate the object
- or change perspective. Esc, q, or x to quit. Space bar stops spinning.
-
- usage:- crystal [flags] [filenames]
- flags:-
- h=n horizontal scale, default is h=1.0
- v=n vertical scale, default is v=1.0
- -r auto reverse, movie runs forward and backward
- -s initial condition will cause object to spin
-
- The default case is a dodecahedron.
-
- The named files must be vector data files containing one or more frame.
- Each frame consists of numbers formatted as follows. First line is number
- of line segments to draw, subsequent lines have floating-point x, y, z,
- and an integer indicating whether the pen is up or down. The 3D points
- (x,y,z) should lie inside a unit sphere. Primitive clipping is performed
- with maximum resolution 0 to 319 horizontally by 0 to 199 vertically.
-
- For example, try the cube:
-
- 15
- 0.5 0.5 0.5 1
- -.5 0.5 0.5 1
- -.5 -.5 0.5 1
- 0.5 -.5 0.5 1
- 0.5 0.5 0.5 2
- 0.5 0.5 -.5 1
- -.5 0.5 -.5 1
- -.5 -.5 -.5 1
- 0.5 -.5 -.5 1
- 0.5 0.5 -.5 0
- 0.5 -.5 0.5 2
- 0.5 -.5 -.5 0
- -.5 0.5 0.5 2
- -.5 0.5 -.5 0
- -.5 -.5 0.5 2
- -.5 -.5 -.5 0
-
- Further Study:
-
- Stats on crystal.exe:
-
- CRYSTAL EXE 34048 11-03-85 6:11p
-
- Each of the following .DAT files contain one object.
-
- TETRA DAT 384 8-14-85 9:55a - tetrahedron
- OCTO DAT 384 7-31-85 4:59p - octohedron
- DODECVEC DAT 1408 3-03-85 4:49p - dodecahedron
- D2VEC DAT 2560 6-17-85 9:55p - nested dodecahedrons
- LINES DAT 1664 8-23-85 1:46p - parallel line segments
- CUBE DAT 256 6-22-85 10:15p - cube
-
- The following C program creates a movie with 80 frames.
-
- DUAL EXE 12416 11-03-85 6:39p
- DUAL C 5120 11-03-85 6:35p - instructions are here
-
- End of crystal.doc:-)